<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <style>
        /*focus伪类选择器 用于选取获得焦点的表单元素*/
        input:focus {
            background: aqua;
            color: red;
        }
        textarea:focus{
            background: blue;
        }
    </style>
</head>
<body>
<label>
    <input type="text" placeholder="请输入账号">
</label>
<textarea name="" id="2" cols="30" rows="10"></textarea>
</body>
</html>